package com.example.weixin_01.controller;

import com.example.weixin_01.pojo.Student;
import com.example.weixin_01.pojo.StudentDto;
import com.example.weixin_01.services.StudentServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author: zhenghuisheng
 * @Date: 2022/8/12 22:24
 */
@Controller
public class StreamStudyTest {
    @Autowired
    private StudentServiceI serviceI;

    /**
     * 替换操作
     * @return
     */
    @ResponseBody
    @RequestMapping("/getAllStudent")
    public List<StudentDto> getAllStudent(){
        return serviceI.getAllStudent();
    }
    /**
     * 过滤，去重，跳过，limit分页
     */
    @ResponseBody
    @RequestMapping("/toFilter")
    public List<Student> toFilter(){
        return serviceI.toFilter();
    }
}
